package cn.xiaolang.function.design_pattern.singleton;

public class SingleTonStarted {


    /**
     * 测试单例
     */
    public static void main(String[] args) {
        System.out.println("====懒汉式单例====");
        System.out.println(SingleTonLazy.getInstance());
        System.out.println(SingleTonLazy.getInstance());
        System.out.println("====饿汉式单例====");
        System.out.println(SingleTonHungary.getInstance());
        System.out.println(SingleTonHungary.getInstance());
    }


}


